package cwinsor.com.leaf_raking;

import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;

import cwinsor.com.leaf_raking.Person.Format;

public class FileTypeSchedulePreferencesSupervisor extends FileTypeSchedulePreferences {

	// name
	public String getName() { return "FileTypeSchedulePreferencesSupervisor"; }


	@Override
	protected void doFindPersons(String firstName, String lastName,
			PrsnList personList, ArrayList<Person> matchingPersons) {

	
		
		// for supervisors
		// find based on first name, last name
		personList.findPerson3(firstName, lastName, matchingPersons);

		// for supervisors
		// confirm there is at least one match
		// warn if there are more than one
		if (matchingPersons.size() == 0) {
			Msg.fatal(dS + ": we have a problem here - there were "
					+ matchingPersons.size() + " persons matching "
					+ " \"" + firstName
					+ "\" \"" + lastName
					+ "\"");
		}
		if (matchingPersons.size() > 1) {
			Msg.note(dS + ": NOTE - there were "
					+ matchingPersons.size() + " persons matching "
					+ " \"" + firstName
					+ "\" \"" + lastName
					+ "\"");
		}

		Msg.note(dS + "ZONA finding match for " + firstName + lastName + " found " + matchingPersons.size());
	}


	// debug
	String dS = this.getClass().getSimpleName();
}